<script type="text/javascript">	
		$(document).ready(function(){ 
			$(".tablesorter").tablesorter(); 
		});
		$(document).ready(function() {

			//When page loads...
			$(".tab_content").hide(); //Hide all content
			$("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab_content:first").show(); //Show first tab content

			//On Click Event
			$("ul.tabs li").click(function() {
				$("ul.tabs li").removeClass("active"); //Remove any "active" class
				$(this).addClass("active"); //Add "active" class to selected tab
				$(".tab_content").hide(); //Hide all tab content
				
				var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
				$(activeTab).fadeIn(); //Fade in the active ID content
				return false;
			});

		});
         
</script>
<?php
$this->Html->addCrumb('Dashboard',array('controller' => 'homes','action' => 'dashboard','admin'=>true));
?> 
<article class="module width_full">
<header>
  <h3>Stats</h3>
</header>
<div class="module_content">
  <article class="stats_graph">
	<img src="http://chart.apis.google.com/chart?chxr=0,0,3000&chxt=y&chs=620x150&cht=lc&chco=76A4FB,80C65A&chd=s:Tdjpsvyvttmiihgmnrst,OTbdcfhhggcTUTTUadfk&chls=2|2&chma=40,20,20,30" width="520" height="140" alt="" />
  </article>
  <article class="stats_overview">
	<div class="overview_today">
	  <p class="overview_day">Today</p>
	  <p class="overview_count">1,876</p>
	  <p class="overview_type">Hits</p>
	  <p class="overview_count">2,103</p>
	  <p class="overview_type">Views</p>
	</div>
	<div class="overview_previous">
	  <p class="overview_day">Yesterday</p>
	  <p class="overview_count">1,646</p>
	  <p class="overview_type">Hits</p>
	  <p class="overview_count">2,054</p>
	  <p class="overview_type">Views</p>
	</div>
  </article>
  <div class="clear"></div>
</div>
</article>
<!-- end of stats article -->

<article class="module width_3_quarter">
	<header>
	  <h3 class="tabs_involved">Content Manager</h3>
	  <ul class="tabs">
		<li><a href="#tab1">Posts</a></li>
		<li><a href="#tab2">Comments</a></li>
	  </ul>
	</header>
	<div class="tab_container">
	  <div id="tab1" class="tab_content">
		<table class="tablesorter" cellspacing="0">
		  <thead>
			<tr>
			  <th></th>
			  <th>Entry Name</th>
			  <th>Category</th>
			  <th>Created On</th>
			  <th>Actions</th>
			</tr>
		  </thead>
		  <tbody>
			<?php for($i=1;$i<=5;$i++){ ?>
				<tr>
					<td><input type="checkbox"></td>
					<td>Lorem Ipsum Dolor Sit Amet</td>
					<td>Articles</td>
					<td>5th April 2011</td>
					<td>
                    <?php 
						echo $this->Html->image("/images/icn_edit.png", array(
							'url' => array('controller' => 'articles', 'admin' => true ,'action' => 'editArticle', 1),
							'title' => 'Edit'
						));
						
						echo $this->Html->image("/images/icn_trash.png", array(
							'url' => array('controller' => 'articles', 'admin' => true ,'action' => 'deleteArticle', 1),
							'title' => 'Trash'
						));
					?>
					</td>
				</tr>
			<?php } ?>
		  </tbody>
		</table>
	  </div>
	  <!-- end of #tab1 -->
	  <div id="tab2" class="tab_content">
		<table class="tablesorter" cellspacing="0">
		  <thead>
			<tr>
			  <th></th>
			  <th>Comment</th>
			  <th>Posted by</th>
			  <th>Posted On</th>
			  <th>Actions</th>
			</tr>
		  </thead>
		  <tbody>
			<?php for($i=1;$i<=5;$i++){ ?>
				<tr>
					<td><input type="checkbox"></td>
					<td>Lorem Ipsum Dolor Sit Amet</td>
					<td>Articles</td>
					<td>5th April 2011</td>
					<td>
						 <?php 
						echo $this->Html->image("/images/icn_edit.png", array(
							'url' => array('controller' => 'Comments', 'admin' => true ,'action' => 'editComment', 1),
							'title' => 'Edit'
						));
						
						echo $this->Html->image("/images/icn_trash.png", array(
							'url' => array('controller' => 'Comments', 'admin' => true ,'action' => 'deleteComment', 1),
							'title' => 'Trash'
						));
					?>
					</td>
				</tr>
			<?php } ?>
		  </tbody>
		</table>
	  </div>
	  <!-- end of #tab2 -->
	</div>
	<!-- end of .tab_container -->
  </article>
  <!-- end of content manager article -->
      <article class="module width_quarter">
        <header>
          <h3>Messages</h3>
        </header>
        <div class="message_list">
          <div class="module_content">
			<?php for($i=1;$i<=10;$i++){ ?>
				<div class="message">
				  <p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor.</p>
				  <p><strong>John Doe</strong></p>
				</div>
			<?php } ?>
          </div>
        </div>
        <footer>
          <form class="post_message">
            <input type="text" value="Message" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
            <input type="submit" class="btn_post_message" value=""/>
          </form>
        </footer>
      </article>
      <!-- end of messages article -->
      <div class="clear"></div>
      <article class="module width_full">
			<header><h3>Basic Styles</h3></header>
				<div class="module_content">
					<h1>Header 1</h1>
				</div>
		</article><!-- end of styles article -->